package org.thread.test05.syn.homework.demo02.test01;

/**
 *打印线程
 * @author CSY
 * @date 2025 - 03 - 12
 */
public class MyRannable implements Runnable {
    private User user;
    private PrintInfo pInfo;

//    private String lock = "";

//    private static Object lock = new Object();

//    private Class lock = Class.class;

    public MyRannable(){}
    public MyRannable(User user, PrintInfo pInfo) {
        this.user = user;
        this.pInfo = pInfo;
    }
    @Override
    public void run() {
        pInfo.printMsg(user);
    }
}
